home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / umoria / constant.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-28  |  8.7 KB  |  172 lines

  1. /*Note to the Wizard:                                            */
  2. /*       Tweaking these constants can *GREATLY* change the game. */
  3. /*       Two years of constant tuning have generated these       */
  4. /*       values.  Minor adjustments are encouraged, but you must */
  5. /*       be very careful not to unbalance the game.  Moria was   */
  6. /*       meant to be challenging, not a give away.  Many         */
  7. /*       adjustments can cause the game to act strangely, or even*/
  8. /*       cause errors.                                           */
  9.  
  10. /* Current version number of Moria                */
  11. #define CUR_VERSION 4.87
  12.  
  13. #ifndef TRUE
  14. #define TRUE 1
  15. #endif
  16. #ifndef FALSE
  17. #define FALSE 0
  18. #endif
  19.  
  20. /* Changing values below this line may be hazardous to your health! */
  21.  
  22. /* key bindings option */
  23. #define ORIGINAL 0          /* uses keypad for directions */
  24. #define ROGUE_LIKE 1        /* uses 'rogue' style keys for directions */
  25.  
  26. /* message line location */
  27. #define MSG_LINE  0
  28.  
  29. /* number of messages to save in a buffer */
  30. #define SAVED_MSGS 20
  31.  
  32. /* Dungeon size parameters                    */
  33. #define MAX_HEIGHT  66      /* Multiple of 11; >= 22 */
  34. #define MAX_WIDTH  198    /* Multiple of 33; >= 66 */
  35. #define SCREEN_HEIGHT  22
  36. #define SCREEN_WIDTH   66
  37. #define QUART_HEIGHT (SCREEN_HEIGHT / 4)
  38. #define QUART_WIDTH  (SCREEN_WIDTH / 4)
  39.  
  40. /* Output dungeon section sizes                    */
  41. #define OUTPAGE_HEIGHT 44     /* 44 lines of dungeon per section       */
  42. #define OUTPAGE_WIDTH  99     /* 100 columns of dungeon per section    */
  43.  
  44. /* Dungeon generation values                    */
  45. /* Note: The entire design of dungeon can be changed by only     */
  46. /*       slight adjustments here.                                */
  47. #define DUN_TUN_RND      36   /* Random direction (4 is min)           */
  48. #define DUN_TUN_CHG      70   /* Chance of changing direction (99 max) */
  49. #define DUN_TUN_FND      12   /* Distance for auto find to kick in     */
  50. #define DUN_TUN_CON      15   /* Chance of extra tunneling             */
  51. #define DUN_ROO_MEA      32   /* Mean of # of rooms, standard dev2     */
  52. #define DUN_TUN_PEN      25   /* % chance of room doors                */
  53. #define DUN_TUN_JCT      15   /* % chance of doors at tunnel junctions */
  54. #define DUN_STR_DEN      5    /* Density of streamers                  */
  55. #define DUN_STR_RNG      2    /* Width of streamers                    */
  56. #define DUN_STR_MAG      3    /* Number of magma streamers             */
  57. #define DUN_STR_MC       95   /* 1/x chance of treasure per magma      */
  58. #define DUN_STR_QUA      2    /* Number of quartz streamers            */
  59. #define DUN_STR_QC       55   /* 1/x chance of treasure per quartz     */
  60. #define DUN_UNUSUAL      300  /* Level/x chance of unusual room        */
  61.  
  62. /* Store constants                        */
  63. #define MAX_OWNERS       18   /* Number of owners to choose from       */
  64. #define MAX_STORES       6    /* Number of different stores            */
  65. #define STORE_INVEN_MAX  24   /* Max number of discrete objs in inven  */
  66. #define STORE_CHOICES    26   /* NUMBER of items to choice stock from  */
  67. #define STORE_MAX_INVEN  20   /* Max diff objs in stock before auto sell*/
  68. #define STORE_MIN_INVEN  14   /* Min diff objs in stock before auto buy*/
  69. #define STORE_TURN_AROUND 3   /* Amount of buying and selling normally */
  70. #define INVEN_INIT_MAX   105  /* Size of store init array              */
  71. #define COST_ADJ         1.00 /* Adjust prices for buying and selling  */
  72.  
  73. /* Treasure constants                        */
  74. #define INVEN_ARRAY_SIZE 35   /* Size of inventory array(Do not change)*/
  75. #define INVEN_MAX      34     /* index of highest entry in inventory array */
  76. #define MAX_OBJ_LEVEL  50     /* Maximum level of magic in dungeon     */
  77. #define OBJ_GREAT      20     /* 1/n Chance of item being a Great Item */
  78. #define MAX_OBJECTS    344    /* Number of objects for universe        */
  79. #define MAX_GOLD       18     /* Number of different types of gold     */
  80. #define MAX_TALLOC     225    /* Max objects per level                 */
  81. #define TREAS_ROOM_ALLOC  7   /* Amount of objects for rooms           */
  82. #define TREAS_ANY_ALLOC   2   /* Amount of objects for corridors       */
  83. #define TREAS_GOLD_ALLOC  2   /* Amount of gold (and gems)             */
  84.  
  85. /* Magic Treasure Generation constants                */
  86. /* Note: Number of special objects, and degree of enchantments   */
  87. /*       can be adjusted here.                                   */
  88. #define OBJ_STD_ADJ      1.25 /* Adjust STD per level                  */
  89. #define OBJ_STD_MIN      7    /* Minimum STD                           */
  90. #define OBJ_TOWN_LEVEL   7    /* Town object generation level          */
  91. #define OBJ_BASE_MAGIC   15   /* Base amount of magic                  */
  92. #define OBJ_BASE_MAX     70   /* Max amount of magic                   */
  93. #define OBJ_DIV_SPECIAL  6    /* magic_chance/#  special magic        */
  94. #define OBJ_DIV_CURSED   1.3  /* magic_chance/#  cursed items         */
  95.  
  96. /* Constants describing limits of certain objects        */
  97. #define OBJ_LAMP_MAX    15000 /* Maximum amount that lamp can be filled*/
  98. #define OBJ_BOLT_RANGE   18   /* Maximum range of bolts and balls      */
  99. #define OBJ_RUNE_PROT    3000 /* Rune of protection resistance         */
  100.  
  101. /* Creature constants                        */
  102. #define MAX_CREATURES     279 /* Number of creatures defined for univ  */
  103. #define MAX_MALLOC        100+1 /* Max that can be allocated          */
  104. #define MAX_MALLOC_CHANCE 160 /* 1/x chance of new monster each round  */
  105. #define MAX_MONS_LEVEL     40 /* Maximum level of creatures            */
  106. #define MAX_SIGHT          20 /* Maximum dis a creature can be seen    */
  107. #define MAX_SPELL_DIS      20 /* Maximum dis creat. spell can be cast  */
  108. #define MAX_MON_MULT       75 /* Maximum reproductions on a level      */
  109. #define MON_MULT_ADJ        7 /* High value slows multiplication       */
  110. #define MON_NASTY          50 /* Dun_level/x chance of high level creat*/
  111. #define MIN_MALLOC_LEVEL   14 /* Minimum number of monsters/level      */
  112. #define MIN_MALLOC_TD       4 /* Number of people on town level (day)  */
  113. #define MIN_MALLOC_TN       8 /* Number of people on town level (night)*/
  114. #define WIN_MON_TOT         2 /* Total number of "win" creatures       */
  115. #define WIN_MON_APPEAR     50 /* Level where winning creatures begin   */
  116. #define MON_SUMMON_ADJ      2 /* Adjust level of summoned creatures    */
  117. #define MON_DRAIN_LIFE      2 /* Percent of player exp drained per hit */
  118.  
  119. /* Trap constants                        */
  120. #define MAX_TRAPA         18  /* Number of defined traps               */
  121. #define MAX_TRAPB         19  /* Includes secret doors                 */
  122.  
  123. /* Descriptive constants                     */
  124. #define MAX_COLORS     67     /* Used with potions     */
  125. #define MAX_MUSH       29     /* Used with mushrooms   */
  126. #define MAX_WOODS      41     /* Used with staffs      */
  127. #define MAX_METALS     31     /* Used with wands       */
  128. #define MAX_ROCKS      52     /* Used with rings       */
  129. #define MAX_AMULETS    39     /* Used with amulets     */
  130. #define MAX_SYLLABLES  153    /* Used with scrolls     */
  131.  
  132. /* Player constants                        */
  133. #define MAX_PLAYER_LEVEL  40  /* Maximum possible character level      */
  134. #define MAX_RACES         8   /* Number of defined races               */
  135. #define MAX_CLASS         6   /* Number of defined classes             */
  136. #define USE_DEVICE        3   /* x> Harder devices x< Easier devices   */
  137. #define MAX_BACKGROUND    128 /* Number of types of histories for univ */
  138. #define PLAYER_FOOD_FULL 10000/* Getting full                          */
  139. #define PLAYER_FOOD_MAX  15000/* Maximum food value, beyond is wasted  */
  140. #define PLAYER_FOOD_FAINT  300/* Character begins fainting             */
  141. #define PLAYER_FOOD_WEAK  1000/* Warn player that he is getting very low*/
  142. #define PLAYER_FOOD_ALERT 2000/* Warn player that he is getting low    */
  143. #define PLAYER_REGEN_FAINT   0.0005   /* Regen factor when fainting    */
  144. #define PLAYER_REGEN_WEAK    0.0015   /* Regen factor when weak        */
  145. #define PLAYER_REGEN_NORMAL  0.0030   /* Regen factor when full        */
  146. #define PLAYER_REGEN_HPBASE  0.0220   /* Min amount hp regen           */
  147. #define PLAYER_REGEN_MNBASE  0.0080   /* Min amount mana regen         */
  148. #define PLAYER_WEIGHT_CAP 130 /* "#"*(1/10 pounds) per strength point  */
  149. #define PLAYER_EXIT_PAUSE 2   /* Pause time before player can re-roll  */
  150.  
  151. /* Base to hit constants                     */
  152. #define BTH_LEV_ADJ      3    /* Adjust BTH per level                  */
  153. #define BTH_PLUS_ADJ     3    /* Adjust BTH per plus-to-hit            */
  154. #define BTH_HIT          12   /* Automatic hit; 1/bth_hit              */
  155.  
  156. /* table size for random() */
  157. #define STATE_SIZE 128
  158.  
  159. /* magic numbers for players inventory array */
  160. #define INVEN_WIELD 22
  161. #define INVEN_HEAD  23
  162. #define INVEN_NECK  24
  163. #define INVEN_BODY  25
  164. #define INVEN_ARM   26
  165. #define INVEN_HANDS 27
  166. #define INVEN_RIGHT 28
  167. #define INVEN_LEFT  29
  168. #define INVEN_FEET  30
  169. #define INVEN_OUTER 31
  170. #define INVEN_LIGHT 32
  171. #define INVEN_AUX   33
  172.